package com.cr.admin.business.topic.service.imple;

import com.cr.admin.business.topic.dao.repository.TopicRepository;
import com.cr.admin.business.topic.pojo.entity.Topic;
import com.cr.admin.business.topic.pojo.param.TopicAddParam;
import com.cr.admin.business.topic.pojo.param.TopicUpdateParam;
import com.cr.admin.business.topic.pojo.query.TopicQuery;
import com.cr.admin.business.topic.service.TopicService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class TopicServiceImpl implements TopicService {
    @Autowired
    private TopicRepository topicRepository;
    @Override
    public List<Topic> list(TopicQuery topicQuery) {

        return topicRepository.selectList(topicQuery);
    }

    @Override
    public void insert(TopicAddParam topicAddParam) {
        topicRepository.insert(topicAddParam);
    }

    @Override
    public void updateById(TopicUpdateParam topicUpdateParam) {
        topicRepository.updateById(topicUpdateParam);
    }

    @Override
    public Topic selectById(Long id) {
        return topicRepository.selectById(id);
    }

    @Override
    public void deleteByIds(List<Long> ids) {
        topicRepository.deleteByIds(ids);
    }

    @Override
    public List<Topic> selectList(Object o) {
        return Collections.emptyList();
    }


}
